############################################################## 
## MOD Title: Music Cat Views (Music Online Hack)
## MOD Author: DB angel < angel@dbangel.net >  http://www.dbangel.net 
## 
## MOD Description:This allows you add the viewed counter of each Category on the Music Online MOD
##                 buWּҲ(Music Online MOD)WW[Us  
## MOD Version: 0.0.1 
## 
## Installation Level: Easy 
## Installation Time: ~5 Minutes 
## Files To Edit: music.php 
##              music_cat.php 
##              templates/subSilver/music_index_body.tpl 
##              language/lang_english/lang_main_music.php 
## Included Files: n/a  
############################################################## 
## Author Notes: First of all, you have to install the Music Online MOD of Cf Manager
##               zw Cf Manager ּҲ (http://www.cfmanager.gate2vn.net/index.php) 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#-----[ SQL ]------------------------------------------ 
# 
ALTER TABLE phpbb_music_cat ADD cat_views mediumint( 8 ) NOT NULL 
# 
#-----[ OPEN ]------------------------------------------ 
# 
music_cat.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
   $songrow = array(); 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
     // 
     // Update the music view counter 
     // 
           $sql = "UPDATE " . MUSIC_CAT_TABLE . " 
                  SET cat_views = cat_views + 1 
                  WHERE cat_id = $cat_id"; 
           if ( !$db->sql_query($sql) ) 
           { 
              message_die(GENERAL_ERROR, "Could not update music views.", '', __LINE__, __FILE__, $sql); 
           } 
# 
#-----[ OPEN ]------------------------------------------ 
# 
music.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
      'CAT_DESC' => $catrows[$i]['cat_desc'], 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#                                
      'CAT_VIEWS' => $catrows[$i]['cat_views'],             
# 
#-----[ FIND ]------------------------------------------ 
# 
   'L_SONGS' => $lang['Songs'], 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#      
   'L_CAT_VIEWS' => $lang['Cat_Views'],      
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/music_index_body.tpl 
# 
#-----[ FIND ]------------------------------------------ 
# 
   <th width="60" class="thTop" nowrap="nowrap">&nbsp;{L_SONGS}&nbsp;</th> 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
   <th width="60" class="thTop" nowrap="nowrap">&nbsp;{L_CAT_VIEWS}&nbsp;</th> 
# 
#-----[ FIND ]------------------------------------------ 
# 
   <td class="catLeft" colspan="3" height="28"><span class="cattitle">{L_PUBLIC_CATS}</span></td> 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
colspan="3" 
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
# 
colspan="4" 
# 
#-----[ FIND ]------------------------------------------ 
# 
   <td class="row2" align="center"><span class="gensmall">{catrow.SONGS}</span></td> 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
   <td class="row2" align="center"><span class="gensmall">{catrow.CAT_VIEWS}</span></td> 
# 
#-----[ FIND ]------------------------------------------ 
# 
   <td class="catbottom" colspan="3" height="28"><span class="cattitle"></span></td> 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
colspan="3" 
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
# 
colspan="4" 
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_main_music.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
$lang['Songs'] = 'Songs'; 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$lang['Cat_Views'] = 'Board Views'; 
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM